package util;

	/**
	 * @function simplificar el uso de la clase Date, utilizando un String, que contenga el formato definido
	 * @author Nati 
	 */

public class MyDate {
	/* ******************************** Variables ******************************** */
	private int dia, mes, anio; 
	
	/* ******************************* Constructor ******************************* */
	public MyDate(int dia, int mes, int anio){
		this.dia = dia; 
		this.mes = mes; 
		this.anio = anio; 
	}
	
	public boolean equals(MyDate date) {
		return this.dia == date.getDia() && this.mes == date.getMes() && this.anio == date.getAnio(); 
	}

	public int getDia() {
		return dia;
	}

	public void setDia(int dia) {
		this.dia = dia;
	}

	public int getMes() {
		return mes;
	}

	public void setMes(int mes) {
		this.mes = mes;
	}

	public int getAnio() {
		return anio;
	}

	public void setAnio(int anio) {
		this.anio = anio;
	}

	public boolean esAnterior(MyDate realSubmiteDate) {
		return (this.getDia() <= realSubmiteDate.getDia() && this.getMes() <= realSubmiteDate.getMes() &&
				this.getAnio() < realSubmiteDate.getAnio()); 
	}
}
